package edu.exp3.model;

public abstract class Person {
    // 子类可直接访问
    protected String id;
    protected String name;
    protected Gender gender;

    public Person(String id, String name, Gender gender) {
        this.id = id;
        this.name = name;
        this.gender = gender;
    }

    // 业务规范：子类必须实现（学生→课表；教师→工作单）
    public abstract void printWorkSheet();

    // 受保护：仅子类或同包可用；Main(跨包)不可直接用
    protected String baseInfo() {
        return "编号：" + id + "，姓名：" + name + "，性别：" + gender;
    }

    // 常用只读访问器
    public String getId() { return id; }
    public String getName() { return name; }
    public Gender getGender() { return gender; }
}
